#!/bin/sh

die () {
   echo "*** mkconfig: $*" 1>&2
   exit 1
}

[ -f makefile ] || die "can not find 'makefile'"

sed \
  -e '/^C[A-Z]*=/!d' \
  -e 's,^,#define PICOSAT_,' \
  -e 's,=, ",' \
  -e 's,$,",' \
  makefile

echo "#define PICOSAT_OS \"`uname -a`\""

exit 0
